#pragma once
#include "afxcmn.h"
#include "Popup.h"
#include "PopupDlg.h"
#include "PopupMessageInfo.h"
#include <vector>

// PopupHistoryDialog dialog

class PopupHistoryDialog : public CDialog
{
	DECLARE_DYNAMIC(PopupHistoryDialog)

public:
	PopupHistoryDialog(CWnd* pParent = NULL);   // standard constructor
	virtual ~PopupHistoryDialog();

	virtual BOOL validateDialog();
	void appendHistory(const PopupMessageInfo & p_message,
					   bool p_received = true);
	void OnOK();

// Dialog Data
	enum { IDD = IDD_DIALOG_HISTORY };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	BOOL OnInitDialog();
	DECLARE_MESSAGE_MAP()
public:
	CListCtrl m_messageListCtrl;

private:
	CImageList m_imageList;
	PopupMessageList m_history;
	PopupMessageList m_sentHistory;
	CpopupDlg *m_parent;

	afx_msg void OnNMDblclkListMessages(NMHDR *pNMHDR, LRESULT *pResult);
	CListCtrl m_sentMessageListCtrl;
	afx_msg void OnNMDblclkListSentMessages(NMHDR *pNMHDR, LRESULT *pResult);
};
